package client.comm.baoding.ui.vm

import android.app.Application
import androidx.lifecycle.MutableLiveData
import client.comm.commlib.network.data.JsonResult
import client.comm.commlib.utils.Util
import client.comm.baoding.api.bean.VersionRet
import client.comm.baoding.ui.viewmodel.MiddleVm

class LauncherViewModel(app: Application) : MiddleVm(app) {

    val versionRet = MutableLiveData<JsonResult<VersionRet>>()

    fun getVersion() {

        hold({
            server.get_update("android", "${Util.getVersionCode(getApplication())}")
        }, success = {
            versionRet.value = it
        })

    }


}